package com.cyk.comicforumjava.utils;

import com.cyk.comicforumjava.demos.properties.JwtTokenProperties;
import com.cyk.comicforumjava.demos.utils.ThreadLocalUtil;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;

@RunWith(JUnit4.class)
public class JwtUtils {

    public static void main(String[] args) {

        Map<String, Object> map =com.cyk.comicforumjava.demos.utils.JwtUtils.parseJWT("cyk","eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZXhwIjoxNDY5MTc0NTU1OCwidXNlcm5hbWUiOiIxIn0.s7DVPhoCX4z8donjvwYYW8lxOUhLjwc8SeJvGTYkL8Q");
        ThreadLocalUtil.set((Long) map.get("id"));
    }
}
